package com.gopay.common.domain.ptbank;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * Entity: G商融通银行服务表

 */
@Entity
@Table(name = "GSRT_BANK_SERVICE_INFO")
public class GsrtBankServiceInfo implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	/** 
	 * id
	 */
	private Long id;

	/** 
	 * 乐观锁版本号
	 */
	private Long version;

	/** 
	 * 银行平台ID
	 */
	private Long bankSuperviseId;

	/** 
	 * 银行服务id
	 */
	private String bankServiceId;

	/** 
	 * 银行服务名称
	 */
	private String bankServiceName;

	/** 
	 * 银行服务状态  开启：01；失效：02
	 */
	private String bankServiceState;
	/**
	 * 银行服务URL
	 */
	private String bankServiceUrl;
	/**
	 * 国付宝服务URL(用来分发不同的接口请求)
	 */
	private String gopayServiceUrl;
	
	/** 
	 * 创建时间
	 */
	private Date createdTs;

	/** 
	 * 记录最后修改时间
	 */
	private Date lastUpdTs;

	private String commentRk;

	private String remark;

	private String remark2;

	private String remark3;

	public GsrtBankServiceInfo() {
	}

	public GsrtBankServiceInfo(Long id, Long version, Long bankSuperviseId, String bankServiceId, String bankServiceName,
							   String bankServiceState, Date createdTs, Date lastUpdTs, String commentRk, String remark,
							   String remark2, String remark3) {
		this.id = id;
		this.version = version;
		this.bankSuperviseId = bankSuperviseId;
		this.bankServiceId = bankServiceId;
		this.bankServiceName = bankServiceName;
		this.bankServiceState = bankServiceState;
		this.createdTs = createdTs;
		this.lastUpdTs = lastUpdTs;
		this.commentRk = commentRk;
		this.remark = remark;
		this.remark2 = remark2;
		this.remark3 = remark3;
	}

	@Id
	@SequenceGenerator(name = "GsrtBankServiceInfoSequence", sequenceName = "GSRT_BANK_SERVICE_INFO_SEQ")
	@GeneratedValue(generator = "GsrtBankServiceInfoSequence", strategy = GenerationType.SEQUENCE)
	@Column(name = "ID", unique = true, nullable = false, precision = 22, scale = 0)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Version
	@Column(name = "VERSION", precision = 22, scale = 0)
	public Long getVersion() {
		return this.version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@Column(name = "BANK_SUPERVISE_ID", nullable = false, precision = 22, scale = 0)
	public Long getBankSuperviseId() {
		return this.bankSuperviseId;
	}

	public void setBankSuperviseId(Long bankSuperviseId) {
		this.bankSuperviseId = bankSuperviseId;
	}

	@Column(name = "BANK_SERVICE_ID", nullable = false, length = 10, scale = 0)
	public String getBankServiceId() {
		return this.bankServiceId;
	}

	public void setBankServiceId(String bankServiceId) {
		this.bankServiceId = bankServiceId;
	}

	@Column(name = "BANK_SERVICE_NAME", nullable = false, length = 50)
	public String getBankServiceName() {
		return this.bankServiceName;
	}

	public void setBankServiceName(String bankServiceName) {
		this.bankServiceName = bankServiceName;
	}

	@Column(name = "BANK_SERVICE_STATE", nullable = false, length = 2)
	public String getBankServiceState() {
		return this.bankServiceState;
	}

	public void setBankServiceState(String bankServiceState) {
		this.bankServiceState = bankServiceState;
	}

	@Column(name = "CREATED_TS", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getCreatedTs() {
		return this.createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	@Column(name = "LAST_UPD_TS", nullable = false)
	@Temporal(TemporalType.TIMESTAMP)
	public Date getLastUpdTs() {
		return this.lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "COMMENT_RK", length = 50)
	public String getCommentRk() {
		return this.commentRk;
	}

	public void setCommentRk(String commentRk) {
		this.commentRk = commentRk;
	}

	@Column(name = "REMARK", length = 50)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "REMARK2", length = 50)
	public String getRemark2() {
		return this.remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3", length = 50)
	public String getRemark3() {
		return this.remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}
	@Column(name = "BANK_SERVICE_URL", length = 100)
	public String getBankServiceUrl() {
		return bankServiceUrl;
	}

	public void setBankServiceUrl(String bankServiceUrl) {
		this.bankServiceUrl = bankServiceUrl;
	}
	@Column(name = "GOPAY_SERVICE_URL", length = 100)
	public String getGopayServiceUrl() {
		return gopayServiceUrl;
	}

	public void setGopayServiceUrl(String gopayServiceUrl) {
		this.gopayServiceUrl = gopayServiceUrl;
	}
}
